home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / The World of Computer Software.iso / grphme10.zip / GRAPHME.DOC < prev    next >
Text File  |  1992-12-08  |  23KB  |  521 lines

  1.                     ┌─────────────────────┐
  2.                     │  G R A P H - M E !  │
  3.                     │    by Tom Dibble,   │
  4.                     │  the tomster of wpi │
  5.                     └─────────────────────┘
  6.  
  7. THE PROGRAM:
  8.      Graph-Me! is a basic two- and three- dimensional graphing
  9.      utility.  Supported are rectangular, "box" (3-d cartesian),
  10.      polar, cylindrical, and spherical coordinate systems.  A
  11.      full compliment of mathematical operations is also
  12.      available, ranging from the basics (+, -, ...) to the more
  13.      powerful (sin, asin ... ) and even to the obscure (modulus,
  14.      acsc ...).  All operations are supported in all modes.
  15.  
  16. FEATURES:
  17.      Full editing of all input values.
  18.      Visual interface for most operations, such as rotations,
  19.      zooms, and shifts.
  20.      Text-based point-and-click interface for major operations.
  21.  
  22. REGISTRATION:
  23.      This program, Graph-Me!, is shareware.  This means that you
  24.      may use it as an evaluation copy for a few weeks before
  25.      actually purchasing it.  The evaluation time-period expires
  26.      four weeks (one month) after Graph-Me! is first used on a
  27.      computer.  Registration entitles you to by-mail (or email)
  28.      notification of each update of the program, and lasts
  29.      through the entirety of the next major revision.  This means
  30.      that if you register version 1.0, you will automatically be
  31.      registered for version 1.1, 1.2 ... 2.0 ... 2.9 when they
  32.      come out.  You will need to re-register for version 3.0. 
  33.      Most of all, however, registering gives you tremendous peace
  34.      of mind, and the freedom of knowing you don't have to hide
  35.      from the Software Piracy Police for the rest of your natural
  36.      lifetime ...
  37.  
  38.      The price is set at $15 per user.  The registered copy may
  39.      be used on more than one computer at once as long as only
  40.      one person is using it at any one time, much like a book in
  41.      the library.
  42.  
  43.      Why so cheap?  Because I do not intend to make much money on
  44.      (this version of) this program.  Instead, I would just like
  45.      to see how wide-spread its use becomes.  Future registration
  46.      fees MAY INCREASE! so register your copy now!  (Actually,
  47.      they probably won't, unless further improvements to the
  48.      program significantly increase the amount of time I put into
  49.      it.)  The idea here is that few people register for big,
  50.      expensive shareware packages, especially ones which offer
  51.      little else besides peace of mind as a reward to
  52.      registration, which means I would get little feedback as far
  53.      as what needs to be added.  I WANT FEEDBACK!
  54.  
  55.      Finally, to register, just print out the file
  56.      "REGISTER.$15", fill out the information (especially *how
  57.      you want to be notified of upgrades*!), fill out the
  58.      questionnaire if you want, and send it (and a check or money
  59.      order for the price of registration) to:
  60.  
  61.                Tom Dibble
  62.                WPI Box 2466
  63.                Worcester, MA  01609-2280
  64.  
  65.      This address will be good until the summer of 1995.
  66.  
  67.      Please feel free to add any comments you can about the
  68.      program, especially suggestions for improvements in the
  69.      interfaces, etc.  Also feel free to comment on this
  70.      marketing strategy, the price, and/or similar programs.
  71.  
  72.      (A quick note on "similar programs":  Before uploading this
  73.      program to the InterNet, I downloaded a few other graphing
  74.      programs to see how Graph-Me! stood in relation.  As far as
  75.      I could tell, very few other programs actually generated
  76.      three-dimensional graphs, and of the ones which did, they
  77.      were usually just demos for store-bought programs, the
  78.      actual price of which hovered between $200 and $350.  I
  79.      found one which almost sounded like it might be similar for
  80.      $25, but I couldn't get it to work -- the command language
  81.      was too confusing for the amount of time I had to play with
  82.      it.  I would really appreciate it if anyone knows of any
  83.      other program which does anything even *similar* that you
  84.      tell me!)
  85.  
  86. STARTING UP:
  87.      First, Graph-Me! is a relative hog for memory.  I know for a
  88.      fact that it will *not* run in much less than 350Kb
  89.      conventional memory.  So, before you start Graph-Me!, type
  90.      'mem' to make sure you have enough memory to start out with. 
  91.      (Graph-Me! may be unkind if you run out of memory ... call
  92.      it a bug ...)
  93.  
  94.      Once Graph-Me! is started, it may flash up a warning to your
  95.      screen concerning GRAPHICS.COM, the DOS Print-Screen
  96.      handler.  If you are running a replacement for GRAPHICS.COM
  97.      (for instance, one which handles higher resolutions or
  98.      colors specific to your printer), or simply do not want to
  99.      print any of the graphs you generate out, ignore this
  100.      message.  You may want to start Graph-Me! with the /NOGRAPH
  101.      switch in the future.
  102.  
  103.      After that screen (press any key to clear it) is the
  104.      copyright screen, which displays the name of the program,
  105.      the author, the version, and the copyright date of
  106.      Graph-Me!.  Again, press any key to clear this screen.
  107.      The final initial screen (really!) is the video-mode
  108.      selection screen.  Simply hit the numbers which best
  109.      describe your system, or hit 'd' for auto-detect (advised,
  110.      as setting video for a card which does not match your own
  111.      may hang the program ... :-< ).  This setting may be changed
  112.      at any time through the text interface, so don't sweat over
  113.      it.
  114.  
  115. USAGE:
  116.      Once Graph-Me! has started up, a simple point-and-click
  117.      interface will appear on the screen.  It is divided into
  118.      four sections: Plot Data, Options, Screen Data, and Formula.
  119.  
  120.      The Plot Data section holds the basic information about the
  121.      plot: the ranges it covers, and the vertical and base
  122.      rotations it has undergone.
  123.  
  124.      The Options section holds the zoom buttons and three other
  125.      buttons, which will each bring up dialogue boxes.
  126.  
  127.      The Screen Data section holds information pertaining to the
  128.      screen, such as the number of screen pixels between graph
  129.      calculations, the video mode, and the screen resolution.  It
  130.      also holds a few miscellaneous tidbits of data which
  131.      probably should have been put elsewhere: the current
  132.      graphing mode, the plotting directions, and the distance
  133.      between sample planes.
  134.  
  135.      The Formula section holds the Dependant/Independent Variable
  136.      information, the formula itself, and the "GRAPH-ME" button.
  137.  
  138.      The specific operation of each of these sections is detailed
  139.      below.
  140.  
  141.      The text interface itself is by nature simple to use,
  142.      especially if you have a mouse (and the driver is loaded
  143.      into memory).  Simply move the highlighter bar to the field
  144.      you wish to change by pressing <Tab> and <Shift>-<Tab>, then
  145.      activate it by pressing <Space> or <Enter>.  Or, with the
  146.      mouse, simply click on the field you wish to alter.  For
  147.      instance, to enter a formula, press <Shift-Tab> (to cycle
  148.      backwards through the fields) twice, highlighting the long
  149.      formula bar at the bottom of the screen, then hit <Enter> to
  150.      activate the input box.  Or, alternatively, simply click
  151.      anywhere just above the "GRAPH-ME" button to select and
  152.      activate the input box.
  153.  
  154.      Once you have entered a formula and defined the ranges (if
  155.      you do not wish to stick with the defaults), activate the
  156.      "GRAPH-ME" button.  The screen will clear, and three axis
  157.      will appear, dead center on the screen.  Now the 
  158.  
  159.           Arrow Keys:
  160.                Rotate the graph in the direction indicated by the
  161.                arrow key.
  162.           Num-Lock + 'Arrow Keys': (numeric keypad)
  163.                Shift the graph in the direction indicated.
  164.           Page-Up:
  165.                Zoom in.
  166.           Ctrl-Page-Up:
  167.                Less dramatic zoom-in
  168.           Page-Down:
  169.                Zoom out.
  170.           Ctrl-Page-Down:
  171.                Less dramatic zoom-out
  172.  
  173.      The Visual Interface also contains keystrokes with no
  174.      command-line equivalent:
  175.           '-':
  176.                Decrease the Variable 1 Accuracy of the graph by
  177.                one pixel.
  178.           '+':
  179.                Increase the Variable 1 Accuracy of the graph by
  180.                one pixel.
  181.           '\':
  182.                Return Accuracy to one pixel.
  183.  
  184.           '-':
  185.                Decrease the Variable 2 Accuracy of the graph by
  186.                one pixel.
  187.           '+':
  188.                Increase the Variable 2 Accuracy of the graph by
  189.                one pixel.
  190.  
  191.           '<':
  192.                Decrease the sampling distance of variable 1.
  193.           ',':
  194.                Decrease the sampling distance of variable 2.
  195.           '>':
  196.                Increase the sampling distance of variable 1.
  197.           '.':
  198.                Increase the sampling distance of variable 2.
  199.           '5', Home:
  200.                Return system to start-up default settings.
  201.           
  202.           'Print-Screen':
  203.                Currently the only way to obtain hard copy of the
  204.                graph you produce.  The next full version should
  205.                contain a GIF-encoder, as well as (perhaps) a
  206.                proprietary format.  Also available (and
  207.                recommended) to obtain hard-copy are numerous
  208.                screen-grabbers, available (most likely) at the
  209.                same site from which you obtained this.
  210.  
  211. PLOT DATA:
  212.      The Plot Data section contains either four or five
  213.      adjustable sections:  the '<=X=>' ... sections, and the two
  214.      ROTATION specifiers.  To adjust the latter (the minimum and
  215.      maximum values calculated), activate the appropriate
  216.      selection bar.  A box will pop up asking you if you want to
  217.      edit the mi(n)imum or ma(x)imum values; press the indicated
  218.      letter or click on the option you choose.  An input-box will
  219.      pop up, with which you can edit the values.  Operation of
  220.      the input box is described below.
  221.  
  222.      The rotation angles are conceptually easier to understand
  223.      from the graphical interface, so that is where I'll start in
  224.      explaining them.  Set a formula in the Formula section, and
  225.      select GRAPH-ME.  The graphics mode will come up.  Pressing
  226.      the horizontal arrow keys (the left and right arrows), the
  227.      graph spins in a certain way.  To be exact, the 'x' and 'y'
  228.      axis are rotating about the 'z' axis.  This is called Base
  229.      Rotation.  Pressing the vertical arrow keys causes the whole
  230.      thing to tilt forward or backward.  This is Vertical
  231.      Rotation.  Note that the Base Rotation is always taken
  232.      before the Vertical Rotation.
  233.  
  234.      This understood, return to the text interface by pressing
  235.      <Esc>.  The values under ROTATION: may have changed.  You
  236.      may edit these directly to obtain an exact angle of view,
  237.      but it is recommended that you rely on the graphical
  238.      operation, as that is much simpler.  Note that the angles
  239.      are in Radians.  (whatever * PI).  2*pi is a full rotation.
  240.  
  241. OPTIONS:
  242.      The Options section of the screen holds five controls: the
  243.      zoom controls, the "Extended Options" button, the "Mouse
  244.      Control" button, and the "Help" button.
  245.  
  246.      The zoom controls act on the graph exactly as if you were in
  247.      graphics mode and pressed Page-Up / Page-Down.  They zoom in
  248.      / out by a factor of two.
  249.  
  250.      The Extended Options button brings up a new box with options
  251.      in it, which is described later.
  252.  
  253.      The Mouse Control Button brings up a simple dialogue for
  254.      controlling the mouse.  The controls are exactly as they
  255.      look; to make your mouse move faster horizontally, click on
  256.      the upper "Faster" bar.  To test any settings you have made,
  257.      click "Test Settings".  To reset either direction, click on
  258.      the reset button above the adjustments bar.  When you are
  259.      done click on "Save and Leave".
  260.  
  261.      The Help button contains a few terse, on-line help screens. 
  262.      They are not meant as a substitute to the manuals, and so a
  263.      manual-viewing option is included (of course, only if there
  264.      is enough memory!).
  265.  
  266. STATUS:
  267.      The Status section may contain between three and five input
  268.      sections.  The five possible are: Mode (the graphing mode),
  269.      Plotting Directions, Sampling Distance, Video Mode, and
  270.      Accuracy.
  271.  
  272.      The Mode is adjusted by clicking on the MODE: bar and then
  273.      selecting from amongst the available (5) modes.
  274.  
  275.      Plotting Directions tells which way(s) you want Graph-Me! to
  276.      sample.  If this is "X-Only", then only lines which lie
  277.      parallel to the 'x' axis will be drawn.  "Both" means that
  278.      it will graph in both Independent Variable directions.
  279.  
  280.      Sampling Distance is the distance between mesh-lines.  The
  281.      'x:' portion lists the distance between lines which *cross*
  282.      the 'x' axis, etc.
  283.  
  284.      Video Mode adjusts the video mode, just like you did when
  285.      you first started Graph-Me!.
  286.  
  287.      Accuracy defines how many pixels lie between successive
  288.      calculations.  The default is one (the minimum) for lines
  289.      (x,y,z,r) and pi/24 for angles.
  290.  
  291. FORMULA:
  292.      The Formula section contains three selections: the Dependant
  293.      Variable Selector, the Formula Bar, and the GRAPH-ME button.
  294.  
  295.      The Dependant Variable selector is your tool for deciding
  296.      how your formula will be input.  Basically, every graph has
  297.      one dependant variable and up to two independent variables. 
  298.      For instance, in 'Box' mode, 'Z' may be the dependant
  299.      variable, and 'x' and 'y' the independent variables.  By
  300.      activating the DVS, you can choose between the current
  301.      solution and the two other possibilities.  The DVS also
  302.      gives you important information you will need when you try
  303.      to adjust the accuracies of your graph: the First
  304.      Independent Variable (IV1) is listed first, and IV2 is
  305.      listed second.  When the formula is graphed, the first pass
  306.      is made holding IV1 constant at several values (so the
  307.      accuracy is adjusted using the '/' and '*' buttons), and the
  308.      second pass is made holding IV2 constant at several values
  309.      ('-' and '+').
  310.  
  311.      The Formula Bar activates an input box for your formula. 
  312.      Generation of that formula is listed elsewhere in this
  313.      document (the next section).
  314.  
  315.      Finally, the GRAPH-ME button sets the grapher into motion,
  316.      clearing the screen and activating graphics mode.
  317.  
  318.  
  319. THE FORMULA:
  320.      As far as it can be done, you type your equation into
  321.      Graph-Me! just as you would write it down on a sheet of
  322.      paper.  For your own peace of mind, you might want to place
  323.      parentheses strategically throughout, but, for the most
  324.      part, if they were not needed when you wrote your formula
  325.      down on paper, they aren't needed when you put your equation
  326.      into Graph-Me!.  Also, spaces sometimes make it easier for
  327.      you to decipher your own equations, and as such are highly
  328.      advised.  Spaces will not slow down Graph-Me! at all, though
  329.      extensive use of parentheses might cause an unnoticeable
  330.      increase in the amount of time it takes to calculate a
  331.      graph.
  332.  
  333.      Another feature of the formula input technique is the
  334.      auto-multiply feature.  Simply put, things like '4x' are, as
  335.      they should be, entirely equivalent to '4*x'.  This leads to
  336.      easier input as well as a more 'natural' feel which so many
  337.      calculators and such lack.
  338.  
  339.      The operators are listed below, under 'LANGUAGE DEFINITION'. 
  340.      They perform the operation indicated to their right.  A
  341.      discussion of first-, second- and third- level operators is
  342.      in the file LEVELS.DOC, which should have been included.
  343.  
  344.  
  345.      A quick note on the alternate input sequence of absolute
  346.      value signs -- '|'.  These can be a bit tricky.  For any
  347.      given level of parentheses, the first symbol encountered is
  348.      translated as 'abs' and '('.  The second symbol on that
  349.      level is then translated as ')'.  This works quite well most
  350.      of the time.  However, a notable exception is the following
  351.      line:
  352.                | ln | r | |
  353.      If I saw that on a written page, I would translate it as
  354.                | (ln|r|) |
  355.      but, since the ln sign does not decrease the parentheses
  356.      level, Graph-Me! translates this line as
  357.                |(ln)| * |(r)|
  358.      which, of course, makes no sense when it actually goes to
  359.      calculate out.  The moral is:  be very careful when using
  360.      the alternate input sequence for absolute value, or simply
  361.      use the 'normal' input sequence of 'abs(whatever)'.
  362.           ( '| ln(|r|) |' works )
  363.  
  364.  
  365.  
  366. WHY GRAPH-ME! ?
  367.      I envision Graph-Me! as a tool for visualizing complex
  368.      formulas in three dimensions.  Given the proliferation of
  369.      hand-held 'graphics' calculators in recent years, there
  370.      should be a need for three-dimensional graphs as well.  (I
  371.      bought a Casio 'Graphics' two years ago, used it for a
  372.      while, then retired it to the bottom of my desk drawer
  373.      because it couldn't handle the things I wanted it to
  374.      handle -- namely, three dimensions.)  Also, it's a kinda
  375.      neat toy.
  376.  
  377.  
  378. LANGUAGE DEFINITION:
  379.      Basic Operators (First-Level):
  380.           (,[  open parenthesis
  381.           ),]  close parenthesis
  382.           +    plus
  383.           -    minus
  384.           \0   EOL
  385.  
  386.      Second-Level Operators:
  387.           *    times
  388.           /    divided by
  389.           ^    to power of ...
  390.           %    modulus
  391.  
  392.      Third-Level Operators:
  393.           sin,si         sine
  394.           cos            cosine
  395.           tan,ta         tangent
  396.           sec,se         secant
  397.           csc            cosecant
  398.           cot            cotangent
  399.           asin,asi       arcsine
  400.           acos           arccosine
  401.           atan,ata       arctangent
  402.           asec,ase       arcsecant
  403.           acsc           arccosecant
  404.           acot           arccotangent
  405.           abs, ab, |     abs. value ('|' encloses expression)
  406.           ln             natural log
  407.           e^,exp         'e' to the ...
  408.           log,lo         log base ten
  409.           gt             least integer greater than
  410.           lt             greatest integer less than
  411.  
  412.  
  413.      Variables:
  414.           x
  415.           y
  416.           z
  417.           th, theta
  418.           ph,phi
  419.           r,rho,rh
  420.  
  421.      Defined Constants:
  422.           pi
  423.           e
  424.  
  425.  
  426.  
  427. ACKNOWLEDGEMENTS:
  428.      Graph-Me! was programmed and compiled on a 386SX-16 using
  429.      Borland Intl.'s Turbo C ver 2.0.  Video support is courtesy
  430.      of the BGI interface included with that package.
  431.  
  432.      The recursive-descent parser grew out of an example in
  433.      _Advanced_C_Programming_, a book by Steven Oualline and the
  434.      Peter Norton Programming Group.  It has been greatly
  435.      modified and totally re-structured, but the basic idea I owe
  436.      to that book.
  437.  
  438.  
  439.  
  440.  *   COPYRIGHT NOTICE:
  441.  *        This program, Graph-Me!, and all supporting
  442.  *        documentation, is hereby copyrighted by Tom
  443.  *        Dibble for use on personal computers, home
  444.  *        and/or business.  All other use is strictly
  445.  *        prohibited except by express written permission
  446.  *        of the author, Tom Dibble.
  447.  
  448.  *   VERSION NOTES:
  449.  *
  450.  *        1.0  At last!  A production version!  Expanded the new
  451.  *             interface to work in all modes, connected the
  452.  *             help system and Extended Options box.  Fixed a few
  453.  *             minor bugs in the interface and in controls.  Most
  454.  *             of all, though, I got everything to finally work
  455.  *             well together.  Graph-Me! 1.0 Released on Dec 9,
  456.  *             1992.
  457.  *
  458.  *        0.97 Finally slapped on the interface.  Reworked
  459.  *             controls to be a bit more intuitive.  Various
  460.  *             improvements relating directly to the new
  461.  *             interface.
  462.  *
  463.  *        0.96 Totally new recursive descent parser, which
  464.  *             works many times better than the old one (ie,
  465.  *             3-2+4 comes out as 5 rather than -3).
  466.  *             Calculator Mode now allowed.  ('#Calc')
  467.  *
  468.  *        0.95 Fixed spherical plotting so that it now goes
  469.  *             in the right direction, and made MaxPhi = PI
  470.  *             by default.  Also, '/' and '*' change accuracy
  471.  *             as well as spacing.  'gt' and 'lt' algorithms
  472.  *             added, as brethren to modulus.
  473.  *             Added tick-marks to graph.
  474.  *             Ctrl-( PgUp || PgDwn ) perform same as Pg-Up /
  475.  *             Pg-Dwn, but in a smaller increment.
  476.  *
  477.  *        0.94 Greatly improved the calc() algorithms.  Sin 
  478.  *             now works properly (sin(2*3)*x now is graphed     
  479.  *             as "(sin(2*3))*x").  Modulus ('%') was added,     
  480.  *             in somewhat standard form (legal for all types    
  481.  *             of operators, integer and otherwise).
  482.  *
  483.  *        0.93 Second set of speed-up put in.  Now the 'eqline'
  484.  *             string is fully expanded into an array of
  485.  *             tokens by the pre_calc() function.  Timed
  486.  *             savings of about 1-2% on simple graphs (sinx)
  487.  *
  488.  *        0.92 First set of speed-up code installed.  The
  489.  *             input string is parsed and translated to a far
  490.  *             more orderly line by pre_calc(), and all
  491.  *             input numbers are put into the flnum[] array.
  492.  *             Timed savings of .1% on sinx and 10% on 
  493.  *             '5.0e0*sin(4*x)'
  494.  *
  495.  *        0.91 First 'version'-ed program.  Far from ready
  496.  *             to be put out for mass consumption.  It is
  497.  *             slow, and lacks any interface beyond a very
  498.  *             simple and quite dumb CLI.  On the interface
  499.  *             side, however, we *do* have a strong line-
  500.  *             editor, and a history buffer.  (COOL!)
  501.  *
  502.  *        Pre-Version 0.91:
  503.  *             You don't want to know.
  504.  *
  505.  
  506.  
  507.  *   The Author:
  508.  *
  509.  *        College Address:
  510.  *             Tom Dibble
  511.  *             W.P.I. box 2466
  512.  *             Worcester, MA  01609-2280
  513.  *
  514.  *        Alternate Home Address:  (Summer, holidays)
  515.  *             Tom Dibble
  516.  *             8087 Willow Glen Ct
  517.  *             Citrus Heights, CA  95610
  518.  *
  519.  *        InterNet Address:
  520.  *             tomster@wpi.wpi.edu
  521.